package com.iterator.bean.wechat.dhy;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;

@Data
public class WxUserLoginVO {

    UserInfo userInfo;

    @JsonFormat(pattern = "yyyy-MM-dd HH-mm-ss")
    Timestamp tokenExpire;

    String token;

    public WxUserLoginVO(){
        this.userInfo = new UserInfo();
    }

    class UserInfo{
        String nickName;
        String avatarUrl;

        @Override
        public String toString() {
            return "UserInfo{" +
                    "nickName='" + nickName + '\'' +
                    ", avatarUrl='" + avatarUrl + '\'' +
                    '}';
        }

        public String getNickName() {
            return nickName;
        }

        public void setNickName(String nickName) {
            this.nickName = nickName;
        }

        public String getAvatarUrl() {
            return avatarUrl;
        }

        public void setAvatarUrl(String avatarUrl) {
            this.avatarUrl = avatarUrl;
        }
    }

    public void setNickName(String nickName){
        this.userInfo.nickName = nickName;
    }

    public void setAvatarUrl(String avatarUrl){
        this.userInfo.avatarUrl = avatarUrl;
    }

}
